package com.example.aop.aspect;

import org.aspectj.lang.annotation.AfterReturning;
import org.aspectj.lang.annotation.Aspect;
import org.springframework.stereotype.Component;

@Aspect
@Component
public class AfterAdviceAspect {
    // 对add, delete方法执行后进行后置增强
    @AfterReturning("execution(* com.example.aop.OrderService.add(..)) || " +
                    "execution(* com.example.aop.OrderService.delete(..))")
    public void afterAdvice() {
        System.out.println("bye, 我是一个后置增强");
    }
}
